package haiyangwangwork.day12.homework;

public class Demo2 {
//    2、从身份证号中取出生日部分 522322199706230027
    public static String getBirth(String idNum){
        char[] chars=idNum.toCharArray();
        for (int i = 0;i<chars.length;i++){
            if (i>=6&&i<14){
                System.out.print(chars[i]+"");
            }
        }
        return "";
    }

    public static void main(String[] args) {
        getBirth("522322199706230017");
    }
}
